import store from '../utils/store'
import uniWrapper from "../utils/store/uniWrapper";

const languageCommon = {
    // 存放重复的翻译内容，方便后面维护

}



const language = {
    langJudge(lang){
        return store.state.app.nowLanguage === lang
    },
    getTranslate(langDict){
        let lang = store.state.app.nowLanguage
        return langDict[lang]
    },
    // 历史读取
    segHistoryPopup: {
        CHI: {
            date: '日期',
            operation: '操作',
            button: '读取',
            searchBar: '快速搜索',
            readHistoryFail: '历史读取失败',
            readImgListFail: '读取图片列表失败'
        },
        ENG: {
            date: 'date',
            operation: 'operation',
            button: 'load',
            searchBar: "quick search",
            readHistoryFail: 'read history fail',
            readImgListFail: 'read img list fail'
        }
    },

    // 提示弹窗错误汇总
    SystemModal: {
        CHI: {
            titleTip: '提示',
            titleError: '错误',

            redirectError: '跳转失败'
        },
        ENG: {
            titleTip: 'Tips',
            titleError: 'Error',

            redirectError: 'redirect error'
        }
    },

    // 登录注册
    segLoginDetail: {
        CHI: {
            login: '登录',
            register: '立即注册',
            userName: '请输入用户名',
            userPasswd: '请输入密码',
            userChangePasswd: '请输入新密码',
            userResetCode: "请输入邮箱验证码",
            userPasswdAgain: '请再次输入密码',
            userEmail: '请输入邮箱',
            forget: '忘记密码',
            confirm: '登录',
            initUser: '初始用户名为: ',
            initPasswd: '初始密码为: ',
            loginError1: '用户名或密码为空',
            loginError2: '两次密码输入不一致',
            loginError3: '邮箱为空',
            loginError4: '邮箱格式错误',
            loginError5: '用户名为空',
            loginError6: '用户名或密码、验证码为空',
            loginError7: '密码长度小于5',
            loginError8: '用户名或密码存在特殊字符',
            registerSuccess: '注册成功, 请查收激活邮件',
            resetSuccess: '密码重置成功',
            forgetSuccess: '验证码已发送',
            RegisterButton: '创建账户',
            forgetButton: '发送验证码',
            forgetResetButton: '重置密码'
        },
        ENG: {
            login: 'Login',
            register: "Don't hava account?Register",
            userName: 'Enter your account name',
            userPasswd: 'Enter password',
            userChangePasswd: 'Enter new password',
            userResetCode: "Enter verification code",
            userPasswdAgain: 'Confirm password',
            userEmail: 'Enter email',
            forget: 'Forget',
            confirm: 'Log in',
            initUser: 'Init account: ',
            initPasswd: 'Init password: ',
            loginError1: 'Account or password is empty',
            loginError2: 'The two passwords entered no the same',
            loginError3: 'Email is emtpy',
            loginError4: 'Email format error',
            loginError5: 'Account is empty',
            loginError6: 'Account or password or code is empty',
            loginError7: 'Password length lower than 5',
            loginError8: 'Account or password has special characters',
            registerSuccess: 'Register success, Please check activate email first',
            resetSuccess: 'Reset success',
            forgetSuccess: 'Verification has send',
            RegisterButton: 'Create an account',
            forgetButton: 'Send verification code',
            forgetResetButton: 'Reset password'
        }
    },

    // 顶部栏
    segTopMenu: {
        CHI: {
            arcusSystem:'ARCUS系统',
            userName:'用户名',

            logoutTitle: '登出',
            logoutContent: '请确认是否退出系统'
        },
        ENG: {
            arcusSystem:'ARCUS System',
            userName:'username',

            logoutTitle: 'logout',
            logoutContent: 'please confirm again'
        }
    },

    // 左侧栏
    segSidebar: {
        CHI: {
            demo:'功能菜单',
            mainInterface:'角膜神经',
            testPage:'组建测试页面',
            error:'错误',
        },
        ENG: {
            demo:'Menu',
            mainInterface:'Corneal nerve',
            testPage:'Component Test Page',
            error:'error',
        }
    },

    // 监控
    segPredictLogMonitor: {
        CHI: {
            title:'ARCUS系统',
            description:'ARCUS系统实时为您服务'
        },
        ENG: {
            title:'ARCUS System',
            description:'ARCUS is running service for you'
        }
    },

    // 文件上传
    segUpload: {
        CHI: {
            pictureName:'图片名称',
            pictureStatus:'图片状态',
            uploadProgress:'上传进度',
            reUpload: '点击重传',
            wait:'请等待...',
            uploadPicture:'点击上传图片',
            uploadError: '文件上传失败',
            uploadOpenError: '文件打开失败'
        },
        ENG: {
            pictureName:'picture name',
            pictureStatus:'picture status',
            uploadProgress:'upload progress',
            reUpload: 're-upload',
            wait:'Please wait...',
            uploadPicture:'Click to upload picture',
            uploadError: 'file upload error',
            uploadOpenError: 'file open fail'
        }
    },
    // 文件上传详情
    segUploadDetail: {
        CHI: {
            title: "上传信息统计表",
            searchButton: '搜索',
            searchPlaceholder: "请输入图片名称",
            clickToClose: '点击任意位置关闭此窗口'
        },
        ENG: {
            title: "Upload summary",
            searchButton: 'search',
            searchPlaceholder: "please input file name",
            clickToClose: 'Click anywhere to close this window'
        }
    },
    // 详情中的表格
    segTable: {
        CHI: {
            noData:'暂无更多数据',
            reUpload: '点击重传'
        },
        ENG: {
            noData:'No more data yet',
            reUpload: 're-upload'
        }
    },

    // 模型选择栏
    segServiceActionSelect: {
        CHI: {
            desktop:'桌面',
            startProcess:'开始处理',
            download:'下载图片',
            dataOutput:'下载数据',
            redisError: 'redis为空，请先上传图片',
            waiting1: '请求排队中....',
            waiting2: '当前位置为: ',
        },
        ENG: {
            desktop:'desktop',
            startProcess:'Start',
            download:'Download graphs',
            dataOutput:'Download data',
            redisError: "redis key is empty, upload first",
            waiting1: 'Request is waiting',
            waiting2: 'Position is: ',

        }
    },

    // 图片选择栏
    segContentChoice: {
        CHI: {
            type:'桌面',
            pictureName:'请输入文件名称',
            history: '历史'
        },
        ENG: {
            type:'desktop',
            pictureName:'Please enter a file name',
            history: 'History'
        }
    },
    // 文件选择的具体表格
    segContentChoiceDetail: {
        CHI: {
            pictureName:'图片名称',
            operate:'操作',
            type:'桌面',
            mobileClick:'移动端点击文件名查看预览',
            noData:'暂无更多数据',
            check:'查看',
            deleteData:'删除',
            headInfo: [
                { name: '图片名称' },
                { name: '操作'}
            ]
        },
        ENG: {
            pictureName:'picture name',
            operate:'operate',
            type:'desktop',
            mobileClick:'Click to preview',
            noData:'No more data yet',
            check:'View',
            deleteData:'Remove',
            headInfo: [
                { name: 'File name' },
                { name: 'Operations'}
            ]
        }
    },

    // 预测结果查看区域
    segImgCube: {
        CHI: {
            text: '等待用户操作',
            info: '此界面的滑动指令被禁止，清选择上方滑块切换',
            debug: '界面的事件处理暂时未完成，请见谅',
        },
        ENG: {
            text:'Waiting operation',
            info: 'Touch event has been disabled, this page. Touch block in top to change content.',
            debug: "Development haven't done, apologize for understanding"
        }
    },

    // 右侧悬浮按钮
    segRightButton: {
        CHI: {
            setting: "设置",
            full: '全屏',
            lang: '中文'
        },
        ENG: {
            setting: "setting",
            full: 'full',
            lang: 'CHI'
        }
    },

    segCharts: {
        CHI: {
            targetValue:'目标值',
            Completion:'完成量'
        },
        ENG: {
            targetValue:'targetValue',
            Completion:'Completion'
        }
    },

    segContentGroup: {
        CHI: {
            sectionName:'',
            groupName:''
        },
        ENG: {
            sectionName:'',
            groupName:''
        }
    },



    segRightMenu: {
        CHI: {
        },
        ENG: {
        }
    },

    segTabSwiper: {
        CHI:{
        },
        ENG: {
        }
    },

    segNerveInteractBox: {
        CHI: {
            length: "神经长度",
            angle: "神经角度",
            attribute: "属性",
            value: "数值"
        },
        ENG: {
            length: "Nerve Length: ",
            angle: "Nerve angle: ",
            attribute: "attribute",
            value: "value"
        }
    },
    arcusmain: {
        CHI: {
            shortcutControl:'快捷控制',
            welcome:'欢迎使用ARCUS系统',
            arcusServes:'ARCUS系统实时为您服务',
            arcusSystem:'ARCUS系统',
            nameList: ['原图', '增强图', '角膜神经分割(原图)', '角膜神经分割(增强图)'],
            nameMobileList: ['原图/增强图', '角膜神经分割(原图/增强图)'],
            categories: ["概率", "等级"],
            originalImage: '原图',
            enhancedImage: '增强图',
            nerveNameList: ['连通域检测(原图)', '连通域检测(增强图)', '分支点检测(原图)', '分支点检测(增强图)', '方向直方图统计', '量化指标'],
            nerveNameMobileList: ['连通域检测(原图/增强图)', '分支点检测(原图/增强图)'],
            systematicsNameList: ['分级投影(原图)', '分级投影(增强图)', '分级热力图(原图)', '分级热力图(增强图)', '弯曲度级别'],
            systematicsNameMobileList: ['分级投影(原图/增强图)', '分级热力图(原图/增强图)'],
            deleteFileFail: "文件删除失败",
            remoteReadFail: '远程读取失败'
        },
        ENG: {
            shortcutControl:'shortcut control',
            welcome:'Welcome to ARCUS System',
            arcusServes:'ARCUS analyses in real-time',
            arcusSystem:'ARCUS system',
            nameList: ['original image', 'enhance image', 'Segmentation result(Original)', 'Segmentation result(Enhanced)'],
            nameMobileList: ['original/enhance image', 'Segmentation result(Original/Enhanced)'],
            categories: ["Prediction Probability", "Predicted Level"],
            originalImage: 'Original',
            enhancedImage: 'Enhanced',
            nerveNameList: ['Connected Component Analysis(Original）', 'Connected Component Analysis(Enhanced)', 'intersection detection (Original)', 'intersection detection (Enhanced)', 'Orientation histogram', 'Quantification metrics'],
            nerveNameMobileList: ['Connected Component Analysis(original/enhance)', 'intersection detection(original/enhance)'],
            systematicsNameList: ['Visual Explanation (Original)', 'Visual Explanation (Enhanced)', 'Visual Explanation (Original)', 'Visual Explanation (Enhanced)', 'Tortuosity Grade'],
            systematicsNameMobileList: ['Visual Explanation(Original/Enhanced)', 'Visual Explanation(Original/Enhanced)'],
            deleteFileFail: "file delete fail",
            remoteReadFail: 'remote state read fail'
        }
    }
}


export default language
